import { IsEmail, Length } from "class-validator";
import BaseEntity from "./BaseEntity";
import { ExtData } from './CustomTransform'
import { Transform, Type } from 'class-transformer'


export class UserEntity extends BaseEntity {

  @Type(() => Number)
  id: number;

  @IsEmail()
  email: string

  @Length(6, 18)
  password: string

  @Length(2, 30)
  nickname: string

  @Transform(ExtData)
  ext_data: string

}

